package com.taomeishu.mailcrazy.fetch.dao;

import org.springframework.jdbc.core.support.JdbcDaoSupport;

import com.taomeishu.mailcrazy.Mail;
import com.taomeishu.mailcrazy.fetch.EmailManager;

public class EmailManagerDAO extends JdbcDaoSupport implements EmailManager {

	@Override
	public void saveEmail(Mail mail) {
		String sql = "insert into mail_mails (username, domain, gmt_create) values(?, ?, now())";
		this.getJdbcTemplate().update(sql, new Object[] {mail.getUsername(), mail.getDomainName()});
	}

}
